<template>
  <div class="activityPreference">
    <homeHeader></homeHeader>
    <!--<figure class="theColorFigure"><img :src="activeImg" alt=""></figure>-->
    <breadcrumb :isShowBanner='false'></breadcrumb>
    <div class="activitiesPerNews">
      <div class="headerTopMain headerTopMainBack">
        <div class="announceList">
          <article class="announceArt">
            <aside>
              <p>{{activityDetailData.title}}</p>
              <p>{{_Util.formatDateTime(activityDetailData.activeTime)}}</p>
            </aside>
            <section>{{activityDetailData.introduction}}</section>
          </article>
        </div>
      </div>
    </div>
    <homeFooter></homeFooter>
  </div>
</template>

<script>
  import './main.scss'
  import homeHeader from '../../components/lotteryColor/header/index';
  import homeFooter from '../../components/footer/index';
  import breadcrumb from '../../components/breadcrumb/index';

  export default {
    data() {
      return {
//        activeImg: require('../../assets/images/helpCenter/help.png'),
        activityDetailData: ''
      }
    },
    activated() {
      this.init();
    },
    mounted() {
    },
    methods: {
      init() {
        let that = this;
        that.initData();
        that.initBreadcrumb();
      },
      initData() {
        let that = this;
        that._Util.post(that, that._Api.POST_GET_ACTIVE_API, {id: that.$route.query.activityId}, (data)=>{
          that.activityDetailData = data;
        });
      },
      //初始化面包屑导航数据
      initBreadcrumb() {
        let breadcrumbData = [
          {name: '首页', routeName: 'index'},
          {name: '优惠活动', routeName: "activity"},
          {name: '活动详情', routeName: "activityDetail",query:{activityId:this.$route.query.activityId}},
        ];
        this.$store.commit('BREADCRUMB_DATA', breadcrumbData);
      },
    },
    components: {
      homeHeader,
      homeFooter,
      breadcrumb,
    }
  }
</script>

<style lang="css" rel="styleheet/css" scoped>

</style>
